<!--
*Author：jxx
 *Contact：283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/inventoryinfo/goods_inventory_mx/q_goods_inventory_mx.js此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/inventoryinfo/goods_inventory_mx/q_goods_inventory_mx.js";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'ID',
                footer: "Foots",
                cnName: '商品库存明细',
                name: 'goods_inventory_mx/q_goods_inventory_mx',
                url: "/q_goods_inventory_mx/",
                sortName: "编码"
            });
            const editFormFields = ref({});
            const editFormOptions = ref([]);
            const searchFormFields = ref({"编码":"","名称":"","数量":[null,null],"库存金额":[null,null]});
            const searchFormOptions = ref([[{"title":"编码","field":"编码","type":"like"},{"title":"名称","field":"名称","type":"like"},{"title":"库存数量","field":"数量","type":"range"},{"title":"库存金额","field":"库存金额","type":"range"}]]);
            const columns = ref([{field:'编码',title:'编码',type:'string',sort:true,width:80,align:'left',sort:true},
                       {field:'名称',title:'名称',type:'string',width:200,align:'left'},
                       {field:'数量',title:'库存数量',type:'float',sort:true,width:110,align:'left'},
                       {field:'库存金额',title:'库存金额',type:'decimal',sort:true,width:110,align:'left'},
                       {field:'无税库存金额',title:'无税库存金额',type:'decimal',sort:true,width:110,align:'left'},
                       {field:'成本价',title:'平均成本价',type:'decimal',sort:true,width:110,align:'left'},
                       {field:'无税成本价',title:'无税成本价',type:'decimal',sort:true,width:110,align:'left'},
                       {field:'成本核算方式',title:'成本核算方式',type:'int',width:80,align:'left'},
                       {field:'ID',title:'ID',type:'guid',width:110,hidden:true,require:true,align:'left'}]);
            const detail = ref({
                cnName: "#detailCnName",
                table: "#detailTable",
                columns: [],
                sortName: "",
                key: ""
            });
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
            };
        },
    });
</script>
